<%@page import="org.docmanagement.commons.Constants"%>
<%@ include file="/inc/header.jsp" %>

<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <th class="colored" colspan="5"><b>Todo List</b></th>
  </tr>
  <tr>
    <td colspan="5">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%">&nbsp;</td>
    <td width="15%"><strong>Category</strong></td>
    <td width="57%"><strong>Todo</strong></td>
    <td width="8%"><strong>Status</strong></td>
    <td width="1%" align="center">&nbsp;</td>
    <td width="1%" align="center">&nbsp;</td>
  </tr>
<logic:present name="todolist">
  <logic:iterate id="todoForm" name="todolist">
  <html:form action="/todo.do">
  <html:hidden name="todoForm" property="id" />
  <html:hidden name="todoForm" property="status" />
  <html:hidden property="actionName" value="Modifier" />
  <tr>
    <td valign="top">&nbsp;</td>
    <td valign="top"><bean:write name="todoForm" property="category"/></td>
    <td valign="top">
    	<logic:equal name="todoForm" property="status" value="<%= String.valueOf(Constants.TODO_FINISHED) %>">
    		<strike>
    	</logic:equal>
    	<bean:write name="todoForm" property="text"/>
    	<logic:equal name="todoForm" property="status" value="<%= String.valueOf(Constants.TODO_FINISHED) %>">
    		</strike>
    	</logic:equal>
    </td>
    <td valign="top">
    	<!--bean:write name="todoForm" property="status"/-->
    	<yacme:status name="todoForm" scope="page" />
    </td>
    <td valign="top" align="center">
    	<html:image property="" value="" src="images/edit.gif" alt="Modifier" onclick="updateActionName(this, 'Modifier')" />
    </td>
    <td valign="top" align="center">
    	<html:image property="" value="" src="images/remove.gif" alt="Supprimer" onclick="updateActionName(this, 'Supprimer')" />
    </td>
  </tr>
  </html:form>
  </logic:iterate>
  <tr>
    <td colspan="6">&nbsp;</td>
  </tr>
</logic:present>
  <tr>
    <td colspan="6">&nbsp;</td>
  </tr>
</table>

<div align="center">
    <html:button property="foo" value="Ajouter" styleClass="button" onclick="location.href = 'todo.do?actionName=PrepareAdd'" />
</div>

<%@ include file="/inc/footer.jsp" %>
